<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"  prefix="c"%>
<!DOCTYPE html>
<style type="text/css">
</style>
<div id="xiugai" align="center" title="修改学生成绩">
	<p style="color: red;">由于时间有限，此页面暂时只实现功能，暂未优化和输入校验处理！</p><br><br>
	<form method="post" action="${pageContext.request.contextPath}/admin/studentadd">
		<input type="hidden" name="id" value="${student.id }" >
		<p style="display:inline;"><label>姓名</label>
		<input type="text" name="name" value="${student.name }" style="width: 10%;"></p>
		<p style="display:inline;"><label>性别</label>
		<input type="text" name="gender" value="${student.gender }" style="width: 10%;"></p>
		<p style="display:inline;"><label>年龄</label>
		<input type="text" name="age" value="${student.age }" style="width: 10%;"></p>
		<p style="display:inline;"><label>电话</label>
		<input type="text" name="number" value="${student.number }" style="width: 10%;"></p>
		<p style="display:inline;"><label>学号</label>
		<input type="text" name="sn" value="${student.sn }" style="width: 10%;"></p><br><br>
		<c:if test="${student.password==null }">
			<input type="hidden" value="123" name="password">
		</c:if>
		<c:if test="${student.password!=null }">
			<input type="hidden" value="${student.password }" name="password">
		</c:if>
		<p  style="display:inline;"><label>班级（班主任）</label><select name="bjId" class="form-control" style="color: #000000;width: 200px;display:inline;" >
			<c:if test="${student!=null }">
				<option value="${student.bj.id }">${student.bj.bjname }(${student.bj.bjteacher })</option>
			</c:if>
			<c:forEach items="${bjs }" var="c">
			<c:if test="${c.id!=student.bj.id }">
				<option value="${c.id }">${c.bjname }(${c.bjteacher })</option>
			</c:if>
			</c:forEach>
		</select></p><br>
		<hr>
		
		<p style="color: red;">暂时只支持新增课程</p><br>
		<p >请选择需要新增的课程</p><br>
		<table>
			<tbody>
					<c:forEach items="${teacher }" var="c">
				<tr align="center">
					<td >
						<input type="checkbox"  name="teacherid" value="${c.id }" style="width: 20px;height: 20px;margin-left: 45%;">
						 <p style="display:inline;"><label>${c.course }(${c.tcname})</label></p>&emsp;&emsp;
								
					</td>
				</tr>
				</c:forEach>
			</tbody>
		</table>
		
		<input type="submit" class="btn btn-primary" style="height: 50px;" value="新增/修改">
	</form>
</div>